package com.oak.broke.model.common;

import com.oak.broke.model.vip.base.ResponseMessage;
import com.oak.broke.model.vip.entity.TsDmEntity;
import com.oak.broke.model.vip.service.ITsDmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author tanghan
 * @Description ts_dm
 * @date 2023/04/18/ 14:11:00
 */
@Api(tags = "查询tsDm")
@RestController
@RequestMapping("/tsdm")
public class TsDmController {

    @Autowired
    private ITsDmService tsDmService;

    /**
     * 根据kind查询ts_dm
     *
     * @param kind
     * @return
     */
    @ApiOperation("根据kind查询tsdm")
    @GetMapping("/list")
    public ResponseMessage<List<TsDmEntity>> listTsDm(@RequestParam("kind") String kind) {
        return ResponseMessage.success(tsDmService.listTsDm(kind));
    }
}
